package com.ruoyi.basicInfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicInfo.mapper.ShipMapper;
import com.ruoyi.basicInfo.domain.Ship;
import com.ruoyi.basicInfo.service.IShipService;

import javax.annotation.Resource;

/**
 * 船舶信息Service业务层处理
 * 
 * @author zbw
 * @date 2022-07-16
 */
@Service
public class ShipServiceImpl implements IShipService 
{
    @Resource
    private ShipMapper shipMapper;

    /**
     * 查询船舶信息
     * 
     * @param shipId 船舶信息主键
     * @return 船舶信息
     */
    @Override
    public Ship selectShipByShipId(String shipId)
    {
        return shipMapper.selectShipByShipId(shipId);
    }

    /**
     * 查询船舶信息列表
     * 
     * @param ship 船舶信息
     * @return 船舶信息
     */
    @Override
    public List<Ship> selectShipList(Ship ship)
    {
        return shipMapper.selectShipList(ship);
    }

    /**
     * 新增船舶信息
     * 
     * @param ship 船舶信息
     * @return 结果
     */
    @Override
    public int insertShip(Ship ship)
    {
        return shipMapper.insertShip(ship);
    }

    /**
     * 修改船舶信息
     * 
     * @param ship 船舶信息
     * @return 结果
     */
    @Override
    public int updateShip(Ship ship)
    {
        return shipMapper.updateShip(ship);
    }

    /**
     * 批量删除船舶信息
     * 
     * @param shipIds 需要删除的船舶信息主键
     * @return 结果
     */
    @Override
    public int deleteShipByShipIds(String[] shipIds)
    {
        return shipMapper.deleteShipByShipIds(shipIds);
    }

    /**
     * 删除船舶信息信息
     * 
     * @param shipId 船舶信息主键
     * @return 结果
     */
    @Override
    public int deleteShipByShipId(String shipId)
    {
        return shipMapper.deleteShipByShipId(shipId);
    }
}
